package com.aliwo.design.patterns.status.ext1;

/**
 * @author xuyayuan
 * @description 没有使用状态模式的代码
 * @date 2021/9/18 16:01
 */
public class Person {
    private int hour;

    public int getHour() {
        return hour;
    }

    public void setHour(int hour) {
        this.hour = hour;
    }

    public void doSomething() {
        if (hour == 7) {
            System.out.println("吃早晨饭");
        } else if (hour == 12) {
            System.out.println("吃中午饭");
        } else if (hour == 18) {
            System.out.println("吃晚饭");
        } else {
            System.out.println("没有饭吃");
        }
    }
}
